import { ref, onMounted } from 'vue'
import { getBannerAPI } from '@/api/home'

export const useBanner = () => {
  const bannerList = ref([])
  const getBanner = async () => {
    const res = await getBannerAPI()
    // console.log(res)
    bannerList.value = res.result
  }

  onMounted(()=>{
    getBanner()
  })

  return {
    bannerList
  }
}